

import com.baomidou.mybatisplus.generator.FastAutoGenerator;
import com.baomidou.mybatisplus.generator.config.DataSourceConfig;

import java.io.File;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;


public class Generator {

	/**
	 * 使用mybatis插件生成
	 * <dependency>
	 * 			<groupId>org.mybatis</groupId>
	 * 			<artifactId>mybatis</artifactId>
	 * 			<version>3.4.6</version>
	 * 		</dependency>
	 *
	 * 		<dependency>
	 * 			<groupId>org.mybatis.generator</groupId>
	 * 			<artifactId>mybatis-generator-core</artifactId>
	 * 			<version>1.3.7</version>
	 * 		</dependency>
	 */
	public static void main(String[] args) {
		List<String> warnings = new ArrayList<String>();
		boolean overwrite = true;
		File configFile = new File("./src/generatorConfig.xml");
		//		try {
		//			ConfigurationParser cp = new ConfigurationParser(warnings);
		//			Configuration config = cp.parseConfiguration(configFile);
		//			DefaultShellCallback callback = new DefaultShellCallback(overwrite);
		//			MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config,
		//				callback, warnings);
		//			myBatisGenerator.generate(null);
		//		} catch (Exception e) {
		//			e.printStackTrace();
		//		}

		System.out.println("------------------done!----------------");

	}



}
